home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / updates / update24.zoo / curses / diffs next >
Text File  |  1992-08-14  |  7KB  |  293 lines

  1. *** 1.14    1992/07/21 15:00:13
  2. --- Changelo    1992/08/14 15:39:54
  3. ***************
  4. *** 167,169 ****
  5. --- 167,183 ----
  6.       mv overwrite.c overwrit.c
  7.       mv toucholap.c touchola.c
  8.   -------------------------- Patchlevel  14 ---------------------------------
  9. + tgetnum.c, tgetent.c:: scott/jrb
  10. +     pay attention to LINES/COLUMNS in the environment. when making
  11. +     the default entry first look in the env, failing which hit
  12. +     linea0() for li/co. if only one of li or co are in the env,
  13. +     then the other is still gotten from linea0().
  14. + ident: ++jrb
  15. +     ident.c  new file with Patchlevel for ident(1)
  16. + mincl: ++jrb
  17. +     add ident.o
  18. + -------------------------- Patchlevel  15 ---------------------------------
  19. *** 1.2    1991/09/24 17:24:27
  20. --- Makefile.mint    1992/08/14 15:39:55
  21. ***************
  22. *** 8,14 ****
  23.   CROSSINC = $(CROSSDIR)/include
  24.   
  25.   AR    = $(CROSSBIN)/car
  26. ! CC    = cgcc -mint -nostdinc -I/net/acae127/home/bammi/atari/mint/mintlib/include -I.
  27.   CPP    = /lib/cpp
  28.   AS     = $(CC)
  29.   LIB     = $(CROSSLIB)
  30. --- 8,14 ----
  31.   CROSSINC = $(CROSSDIR)/include
  32.   
  33.   AR    = $(CROSSBIN)/car
  34. ! CC    = cgcc -mint
  35.   CPP    = /lib/cpp
  36.   AS     = $(CC)
  37.   LIB     = $(CROSSLIB)
  38. *** 1.1    1991/05/04 15:09:33
  39. --- Mmakefile.16    1992/08/14 15:39:55
  40. ***************
  41. *** 9,15 ****
  42.   
  43.   MODEL = -mshort
  44.   DEFINES = -DDGK -DGEMDOS
  45. ! COPTS= -O -fomit-frame-pointer -fcombine-regs -fstrength-reduce \
  46.    -DNDEBUG $(DEFINES) $(XFLAGS)
  47.   
  48.   # normal CFLAGS
  49. --- 9,15 ----
  50.   
  51.   MODEL = -mshort
  52.   DEFINES = -DDGK -DGEMDOS
  53. ! COPTS= -O -fomit-frame-pointer -fstrength-reduce \
  54.    -DNDEBUG $(DEFINES) $(XFLAGS)
  55.   
  56.   # normal CFLAGS
  57. *** 1.1    1991/05/04 15:09:33
  58. --- Mmakefile.32    1992/08/14 15:39:56
  59. ***************
  60. *** 9,15 ****
  61.   
  62.   MODEL =
  63.   DEFINES = -DDGK -DGEMDOS
  64. ! COPTS= -O -fomit-frame-pointer -fcombine-regs -fstrength-reduce \
  65.    -DNDEBUG $(DEFINES) $(XFLAGS)
  66.   
  67.   # normal CFLAGS
  68. --- 9,15 ----
  69.   
  70.   MODEL =
  71.   DEFINES = -DDGK -DGEMDOS
  72. ! COPTS= -O -fomit-frame-pointer -fstrength-reduce \
  73.    -DNDEBUG $(DEFINES) $(XFLAGS)
  74.   
  75.   # normal CFLAGS
  76. *** 1.12    1992/06/24 15:39:35
  77. --- PatchLev.h    1992/08/14 15:39:56
  78. ***************
  79. *** 1,5 ****
  80.   /*
  81. -  *    PathLevel: 14
  82.    *
  83.    *    the Patch Level above is to identify the version
  84.    *    of the all the files in this directory. given the above
  85. --- 1,7 ----
  86. + #define    PatchLevel "15"
  87.   /*
  88.    *
  89.    *    the Patch Level above is to identify the version
  90.    *    of the all the files in this directory. given the above
  91. *** 1.3    1992/06/24 15:39:35
  92. --- mincl    1992/08/14 15:40:05
  93. ***************
  94. *** 9,15 ****
  95.   TERMOBJ =    tgetent.o tgetflag.o tgetnum.o tgetstr.o tgoto.o \
  96.           tputs.o fgetlr.o
  97.   
  98. ! OTHER = xconsole.o
  99.   
  100.   all: $(ALL)
  101.   
  102. --- 9,15 ----
  103.   TERMOBJ =    tgetent.o tgetflag.o tgetnum.o tgetstr.o tgoto.o \
  104.           tputs.o fgetlr.o
  105.   
  106. ! OTHER = xconsole.o ident.o
  107.   
  108.   all: $(ALL)
  109.   
  110. *** 1.6    1992/04/19 16:42:24
  111. --- tgetent.c    1992/08/14 15:40:10
  112. ***************
  113. *** 97,102 ****
  114. --- 97,106 ----
  115.   #  include <compiler.h>
  116.   #endif
  117.   
  118. + #if __STDC__
  119. + #  include<stdlib.h>
  120. + #endif
  121.   #define TRUE 1
  122.   #define FALSE 0
  123.   #define BUFSIZE 1024            /* Assumed size of external buffer */
  124. ***************
  125. *** 492,506 ****
  126.   #  ifdef GEMDOS
  127.           /* 
  128.            * if we do not have any better information, then
  129.            * we will try to glimpse screen sizes from Line-A variables
  130.            */
  131. !         linea0();
  132.           strcpy (bp, ":co#");
  133. !         (void) _ultoa((unsigned long) (V_CEL_MX + 1),
  134. !                   bp + sizeof(":co#") - 1, 10);
  135.           strcat (bp, ":li#");
  136. !         (void) _ultoa((unsigned long) (V_CEL_MY + 1),
  137. !                   bp + strlen(bp), 10);
  138.           strcat (bp, term_default);
  139.   #  endif
  140.           return (FILE *) NULL;
  141. --- 496,531 ----
  142.   #  ifdef GEMDOS
  143.           /* 
  144.            * if we do not have any better information, then
  145. +                  * first try to glimpse screen size from the env
  146. +                  * failing which
  147.            * we will try to glimpse screen sizes from Line-A variables
  148.            */
  149. !                 char *rows, *cols = getenv("COLUMNS");
  150. !                 if(!(rows = getenv("LINES")))
  151. !                     rows = getenv("ROWS");
  152. !                 
  153. !                 if((!rows) || (!cols))
  154. !                     linea0();
  155.           strcpy (bp, ":co#");
  156. !                 if(!cols)
  157. !                 {
  158. !                     (void) _ultoa((unsigned long) (V_CEL_MX + 1),
  159. !                                   bp + sizeof(":co#") - 1, 10);
  160. !                 }
  161. !                 else
  162. !                     strcat(bp, cols);
  163. !                 
  164.           strcat (bp, ":li#");
  165. !                 if(!rows)
  166. !                 {
  167. !                     (void) _ultoa((unsigned long) (V_CEL_MY + 1),
  168. !                                   bp + strlen(bp), 10);
  169. !                 }
  170. !                 else
  171. !                     strcat(bp, rows);
  172. !                 
  173.           strcat (bp, term_default);
  174.   #  endif
  175.           return (FILE *) NULL;
  176. *** 1.3    1991/05/04 18:38:14
  177. --- tgetnum.c    1992/08/14 15:40:10
  178. ***************
  179. *** 40,52 ****
  180.    *
  181.    */
  182.   
  183.   #include <stdio.h>
  184.   #include <ctype.h>
  185.   #include <string.h>
  186.   #include <termcap.h>
  187. ! #ifndef _COMPILER_H
  188. ! #  include <compiler.h>
  189.   #endif
  190.   
  191.   # ifdef MSDOS
  192. --- 40,55 ----
  193.    *
  194.    */
  195.   
  196. + #ifndef _COMPILER_H
  197. + #  include <compiler.h>
  198. + #endif
  199.   #include <stdio.h>
  200.   #include <ctype.h>
  201.   #include <string.h>
  202.   #include <termcap.h>
  203. ! #if __STDC__
  204. ! #  include <stdlib.h>
  205.   #endif
  206.   
  207.   # ifdef MSDOS
  208. ***************
  209. *** 82,89 ****
  210. --- 85,121 ----
  211.    *        Return failure value.
  212.    *    End tgetnum
  213.    *
  214. +  *  Atari ST specific change, when this fails, we chech to see if we are 
  215. +  *     trying to get the entry for "li" = lines, ro "co" = columns, if 
  216. +  *     this is the case try the environment variables "ROWS" "LINES" and 
  217. +  *     "COLUMNS", before returning error. This is great for window 
  218. +  *     managers like "Gemini" or "TOSwin". 
  219. +  *
  220.    */
  221.   
  222. + #if defined(GEMDOS)
  223. + /* get line /col from the env */
  224. + static int getlinecol(id)
  225. + char *id;
  226. + {
  227. +     char *p;
  228. +     if (id[0] == 'l' && id[1] =='i' )
  229. +     {
  230. +         if(!(p = getenv("LINES")))
  231. +             p = getenv("ROWS");
  232. +         if(p)
  233. +             return(atoi(p));
  234. +     }
  235. +     else if (id[0] == 'c' && id[1] =='o' )
  236. +     {
  237. +         if((p = getenv("COLUMNS")))
  238. +             return(atoi(p));
  239. +     }
  240. +     return(-1);
  241. + }
  242. + #endif
  243.   int tgetnum(id)
  244.   char *id;
  245.   {
  246. ***************
  247. *** 95,101 ****
  248. --- 127,138 ----
  249.       bp++;
  250.       if (*bp++ == id[0] && *bp != '\0' && *bp++ == id[1]) {
  251.           if (*bp != '\0' && *bp++ != '#') {
  252. + #if !defined(GEMDOS)
  253.           return(-1);
  254. + #else 
  255. +                 return getlinecol(id);
  256. + #endif 
  257.           } else {
  258.           value = 0;
  259.           if (*bp == '0') {
  260. ***************
  261. *** 110,115 ****
  262.           return(value);
  263.           }
  264.       }
  265. !     }
  266. !     return(-1);
  267.   }
  268. --- 147,156 ----
  269.           return(value);
  270.           }
  271.       }
  272. !       }
  273. ! #if !defined(GEMDOS)
  274. !       return(-1);
  275. ! #else 
  276. !       return getlinecol(bp);
  277. ! #endif 
  278.   }
  279.